<?php

namespace LRP\Contract;

use LRP\Task;

/**
 * Interface TubeInterface
 *
 * PHP Version > 7.0
 *
 * @package LRP\Contract
 * @author  Jon
 * @link    https://gitee.com/joncc/long-running-processor
 */
interface TubeInterface
{
    /**
     * @param string $type
     * @return TubeInterface
     */
    public function type(string $type): self;

    /**
     * @return string
     */
    public function getType(): string;

    /**
     * @param Task $task
     * @return mixed
     */
    public function push(Task $task);

    /**
     * @return mixed
     */
    public function pop();
}